pictures = {}

path = "profile_1234.png"

try:
    pictures.setdefault(path, open(path, "a+b"))
except OSError:
    print("打开文件失败")
else:
    handle = pictures[path]

handle.seek(0)
image_data = handle.read()
